init

fun init()(source)

Initialize CouchbaseLite library. Unlike the Couchbase Lite Java SDK, this method is optional to call before using CouchbaseLite. The no-parameter CouchbaseLite.init() will be called automatically by default.

This method expects the current directory to be writeable and will throw an IllegalStateException if it is not. Use init(boolean, File, File) to specify alternative root and scratch directories.

Throws

on initialization failure


fun init(debug: Boolean)(source)

Initialize CouchbaseLite library. Unlike the Couchbase Lite Java SDK, this method is optional to call before using CouchbaseLite. The no-parameter CouchbaseLite.init() will be called automatically by default.

This method expects the current directory to be writeable and will throw an IllegalStateException if it is not. Use init(boolean, File, File) to specify alternative root and scratch directories.

Parameters

debug

true if debugging

Throws

on initialization failure


fun init(debug: Boolean, rootDir: File, scratchDir: File)(source)

Initialize CouchbaseLite library. Unlike the Couchbase Lite Java SDK, this method is optional to call before using CouchbaseLite. The no-parameter CouchbaseLite.init() will be called automatically by default.

This method allows specifying a default root directory for database files, and the scratch directory used for temporary files (the native library, etc.). Both directories must be writable by this process.

Parameters

debug

true if debugging

rootDir

default directory for databases

scratchDir

scratch directory for SQLite

Throws

on initialization failure